#include "vtkMRMLImageNode.h"
#include "vtkMRMLImageDisplayNode.h"
vtkStandardNewMacro(vtkMRMLImageNode);
vtkCxxRevisionMacro(vtkMRMLImageNode, "$Revision: 1.0 $");

vtkMRMLImageNode::vtkMRMLImageNode(void)
{
}

vtkMRMLImageNode::~vtkMRMLImageNode(void)
{
}

 vtkMRMLNode* vtkMRMLImageNode::CreateNodeInstance()
{
	vtkObject* ret = vtkObjectFactory::CreateInstance("vtkMRMLImageNode");
	if(ret)
	{
		return (vtkMRMLImageNode*)ret;
	}
	// If the factory was unable to create the object, then create it here.
	return new vtkMRMLImageNode;
}

 const char* vtkMRMLImageNode::GetNodeTagName()
{
	return "ImageNode";
}

 void vtkMRMLImageNode::SetAndObserveImageData(vtkImageData *ImageData)
 {

	 int n = GetNumberOfDisplayNodes();
	 for (int i = 0; i < n; ++i)
	 {
		 vtkMRMLImageDisplayNode * node = vtkMRMLImageDisplayNode::SafeDownCast(GetNthDisplayNode(i));
		 if (node)
		 {
			 node->SetImageData(ImageData);
		 }
	 }
	 Superclass::SetAndObserveImageData(ImageData);
 }

void vtkMRMLImageNode::UpdateFromMRML()
 {

 }